/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package newpackage;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Juan
 */
@Entity
@Table(name = "USUARIOS")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Usuarios.findAll", query = "SELECT u FROM Usuarios u"),
    @NamedQuery(name = "Usuarios.findByIdUsu", query = "SELECT u FROM Usuarios u WHERE u.idUsu = :idUsu"),
    @NamedQuery(name = "Usuarios.findByUsu", query = "SELECT u FROM Usuarios u WHERE u.usu = :usu"),
    @NamedQuery(name = "Usuarios.findByPas", query = "SELECT u FROM Usuarios u WHERE u.pas = :pas"),
    @NamedQuery(name = "Usuarios.findByIdNivel", query = "SELECT u FROM Usuarios u WHERE u.idNivel = :idNivel")})
public class Usuarios implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "IdUsu")
    private Short idUsu;
    @Column(name = "usu")
    private String usu;
    @Column(name = "pas")
    private String pas;
    @Column(name = "IdNivel")
    private Short idNivel;

    public Usuarios() {
    }

    public Usuarios(Short idUsu) {
        this.idUsu = idUsu;
    }

    public Short getIdUsu() {
        return idUsu;
    }

    public void setIdUsu(Short idUsu) {
        this.idUsu = idUsu;
    }

    public String getUsu() {
        return usu;
    }

    public void setUsu(String usu) {
        this.usu = usu;
    }

    public String getPas() {
        return pas;
    }

    public void setPas(String pas) {
        this.pas = pas;
    }

    public Short getIdNivel() {
        return idNivel;
    }

    public void setIdNivel(Short idNivel) {
        this.idNivel = idNivel;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idUsu != null ? idUsu.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Usuarios)) {
            return false;
        }
        Usuarios other = (Usuarios) object;
        if ((this.idUsu == null && other.idUsu != null) || (this.idUsu != null && !this.idUsu.equals(other.idUsu))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "newpackage.Usuarios[ idUsu=" + idUsu + " ]";
    }
    
}
